package com.test.group6.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.test.group6.domain.EnterpriseInformation;

@Mapper
public interface EnterpriseSelectMapper {

	/**
	 * @author zhang_sguang
	 * @param index 分页展示的页号
	 * @return {@link List<EnterpriseInformation>}
	 */
	@Select("select enterprise_id enterpriseId,enterprise_name enterpriseName,card_type cardType,"
			+ "card_id cardId,enterprise_date enterpriseDate,capital,address,workes,"
			+ "register_date registerDate,update_date updateDate "
			+ "from enterprise_information " + "order by enterprise_id limit #{index},10")
	List<EnterpriseInformation> queryAllEnterprise(@Param("index")Integer index);

	/**
	 * @author zhang_sguang
	 * @return 数据总条数
	 */
	@Select("select count(enterprise_Id) from enterprise_information")
	Integer queryCount();

}
